import React, { Component } from 'react';
import styles from './item.module.css'
class Index extends Component {
    render() {
        return (
            <div className={styles.container}>
                {this.props.playlists.map(item => {
                    return (
                        <div className={styles.item} key={item.id} onClick={()=>{this.props.alent(item.id)}}>
                            <img src={item.coverImgUrl} alt="" />
                            <p>{item.name}</p>
                        </div>
                    )
                })}
            </div>
        );
    }

}

export default Index;
